/*
   KQ is Copyright (C) 2002 by Josh Bolduc

   This file is part of KQ... a freeware RPG.

   KQ is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 2, or (at your
   option) any later version.

   KQ is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with KQ; see the file COPYING.  If not, write to
   the Free Software Foundation,
       675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include "allegro.h"
#include "kq.h"
#include "res.h"


// *INDENT-OFF*
PALETTE pal = {
   {0, 0, 0, 0},     {0, 0, 0, 0},     {8, 8, 8, 0},     {12, 12, 12, 0},
   {16, 16, 16, 0},  {20, 20, 20, 0},  {24, 24, 24, 0},  {28, 28, 28, 0},
   {33, 33, 33, 0},  {38, 38, 38, 0},  {43, 43, 43, 0},  {47, 47, 47, 0},
   {51, 51, 51, 0},  {55, 55, 55, 0},  {59, 59, 59, 0},  {63, 63, 63, 0},

   {7, 0, 0, 0},     {15, 0, 0, 0},    {23, 0, 0, 0},    {31, 0, 0, 0},
   {39, 0, 0, 0},    {47, 0, 0, 0},    {55, 0, 0, 0},    {63, 0, 0, 0},
   {63, 7, 7, 0},    {63, 14, 14, 0},  {63, 21, 21, 0},  {63, 29, 29, 0},
   {63, 36, 36, 0},  {63, 44, 44, 0},  {63, 51, 51, 0},  {63, 59, 59, 0},

   {0, 7, 0, 0},     {0, 11, 0, 0},    {0, 15, 0, 0},    {0, 19, 0, 0},
   {0, 23, 0, 0},    {0, 27, 0, 0},    {0, 31, 0, 0},    {0, 39, 0, 0},
   {0, 47, 0, 0},    {0, 55, 0, 0},    {0, 63, 0, 0},    {22, 63, 22, 0},
   {37, 63, 37, 0},  {47, 63, 47, 0},  {53, 63, 53, 0},  {58, 63, 58, 0},

   {0, 0, 7, 0},     {0, 0, 15, 0},    {0, 0, 23, 0},    {0, 0, 31, 0},
   {0, 0, 39, 0},    {0, 0, 47, 0},    {0, 0, 55, 0},    {0, 0, 63, 0},
   {7, 7, 63, 0},    {15, 15, 63, 0},  {22, 22, 63, 0},  {30, 30, 63, 0},
   {37, 37, 63, 0},  {45, 45, 63, 0},  {52, 52, 63, 0},  {58, 58, 63, 0},

   {7, 0, 7, 0},     {15, 0, 15, 0},   {23, 0, 23, 0},   {31, 0, 31, 0},
   {39, 0, 39, 0},   {47, 0, 47, 0},   {55, 0, 55, 0},   {63, 0, 63, 0},
   {63, 7, 63, 0},   {63, 15, 63, 0},  {63, 22, 63, 0},  {63, 30, 63, 0},
   {63, 37, 63, 0},  {63, 45, 63, 0},  {63, 52, 63, 0},  {63, 58, 63, 0},

   {7, 1, 0, 0},     {15, 2, 0, 0},    {23, 4, 0, 0},    {31, 7, 0, 0},
   {39, 9, 0, 0},    {46, 12, 0, 0},   {54, 15, 0, 0},   {63, 18, 0, 0},
   {63, 21, 4, 0},   {63, 25, 8, 0},   {63, 29, 12, 0},  {63, 34, 16, 0},
   {63, 38, 22, 0},  {63, 44, 28, 0},  {63, 49, 34, 0},  {63, 55, 41, 200},

   {7, 7, 0, 200},   {11, 11, 0, 0},   {15, 15, 0, 0},   {19, 19, 0, 200},
   {23, 23, 0, 0},   {27, 27, 0, 0},   {31, 31, 0, 0},   {39, 39, 0, 0},
   {47, 47, 0, 0},   {54, 54, 0, 0},   {63, 63, 0, 0},   {63, 63, 23, 0},
   {63, 63, 35, 0},  {63, 63, 47, 0},  {63, 63, 53, 0},  {63, 63, 58, 0},

   {0, 7, 7, 0},     {0, 11, 11, 0},   {0, 15, 15, 0},   {0, 19, 19, 0},
   {0, 23, 23, 0},   {0, 27, 27, 0},   {0, 31, 31, 0},   {0, 39, 39, 0},
   {0, 47, 47, 0},   {0, 55, 55, 0},   {0, 63, 63, 0},   {16, 63, 63, 0},
   {32, 63, 63, 0},  {47, 63, 63, 0},  {51, 63, 63, 0},  {58, 63, 63, 0},

   {3, 1, 0, 0},     {7, 3, 0, 0},     {11, 5, 0, 0},    {15, 8, 0, 0},
   {19, 11, 0, 0},   {23, 14, 0, 0},   {27, 17, 0, 0},   {31, 20, 0, 105},
   {35, 24, 0, 93},  {39, 27, 0, 0},   {43, 32, 0, 0},   {47, 35, 0, 0},
   {51, 38, 0, 0},   {55, 42, 0, 0},   {59, 46, 0, 0},   {63, 55, 22, 0},

   {6, 3, 3, 0},     {12, 6, 6, 0},    {18, 9, 9, 0},    {24, 12, 12, 0},
   {30, 15, 15, 0},  {36, 18, 18, 0},  {42, 21, 21, 0},  {48, 24, 24, 0},
   {54, 27, 27, 0},  {60, 30, 30, 0},  {63, 33, 33, 0},  {63, 36, 36, 0},
   {63, 39, 39, 0},  {63, 43, 43, 0},  {63, 47, 47, 0},  {63, 51, 51, 0},

   {3, 6, 3, 0},     {6, 12, 6, 0},    {9, 18, 9, 0},    {12, 24, 12, 0},
   {15, 30, 15, 0},  {18, 36, 18, 0},  {21, 42, 21, 0},  {24, 48, 24, 0},
   {27, 54, 27, 0},  {30, 60, 30, 0},  {33, 63, 33, 0},  {37, 63, 37, 0},
   {41, 63, 41, 0},  {45, 63, 45, 0},  {49, 63, 49, 0},  {53, 63, 53, 0},

   {4, 2, 1, 0},     {8, 4, 2, 0},     {12, 6, 3, 0},    {16, 8, 4, 0},
   {20, 10, 5, 0},   {24, 16, 7, 0},   {28, 20, 10, 0},  {32, 24, 16, 0},
   {36, 28, 20, 0},  {40, 32, 25, 0},  {44, 36, 28, 0},  {48, 40, 32, 0},
   {52, 44, 36, 0},  {56, 48, 40, 0},  {60, 52, 44, 0},  {63, 56, 48, 0},

   {6, 3, 6, 0},     {12, 6, 12, 0},   {18, 9, 18, 0},   {24, 12, 24, 0},
   {30, 15, 30, 0},  {36, 18, 36, 0},  {42, 21, 42, 0},  {48, 24, 48, 0},
   {54, 27, 54, 0},  {60, 30, 60, 0},  {63, 34, 63, 0},  {63, 38, 63, 0},
   {63, 42, 63, 0},  {63, 46, 63, 0},  {63, 50, 63, 0},  {63, 54, 63, 87},

   {6, 3, 2, 79},    {12, 6, 3, 0},    {18, 9, 4, 0},    {24, 12, 5, 0},
   {30, 15, 6, 0},   {36, 18, 7, 0},   {42, 21, 8, 0},   {48, 24, 9, 0},
   {54, 27, 11, 0},  {60, 30, 13, 0},  {63, 33, 15, 0},  {63, 36, 17, 0},
   {63, 39, 19, 80}, {63, 42, 21, 71}, {63, 46, 24, 0},  {63, 50, 27, 0},

   {6, 6, 3, 0},     {12, 12, 6, 87},  {18, 18, 9, 0},   {24, 24, 12, 0},
   {30, 30, 15, 0},  {36, 36, 18, 0},  {42, 42, 21, 0},  {48, 48, 24, 0},
   {54, 54, 27, 0},  {60, 60, 30, 0},  {63, 63, 34, 0},  {63, 63, 38, 0},
   {63, 63, 42, 0},  {63, 63, 46, 200}, {63, 63, 50, 0}, {63, 63, 54, 200},

   {3, 6, 6, 0},     {6, 12, 12, 0},   {9, 18, 18, 0},   {12, 24, 24, 0},
   {15, 30, 30, 0},  {18, 36, 36, 0},  {21, 42, 42, 0},  {24, 48, 48, 0},
   {27, 54, 54, 0},  {30, 60, 60, 0},  {34, 63, 63, 0},  {38, 63, 63, 0},
   {42, 63, 63, 0},  {46, 63, 63, 0},  {50, 63, 63, 0},  {63, 63, 63, 0}
};



s_item items[NUM_ITEMS] = {
   {"", 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    {0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Mace", 1, 8, "", 0, 0, 0, 1, 0, 0, 0, 0, 4, 100, 100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -5, 0, 8, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Morningstar", 1, 9, "", 0, 0, 0, 2, 0, 0, 0, 0, 4, 150, 600,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -10, 0, 20, 5, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Frozen Star", 1, 244, "", 0, 0, 0, 7, 0, 0, 8, 0, 4, 200, 5200,
    {1, 1, 1, 1, 0, 1, 1, 0},
    {0, 0, 2, 0, 0, 0, -20, 0, 58, 15, 0, 0, 0},
    {0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Death's Head", 1, 121, "Undead destroyer", 0, 0, 7, 9, 0, 0, 6, 31, 4, 250, 9500,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 5, 0, 0, -35, 0, 80, 25, 0, 0, 0},
    {0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"War Hammer", 2, 9, "", 0, 0, 0, 3, 0, 0, 0, 0, 4, 150, 1750,
    {1, 1, 1, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -15, 0, 35, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Stun Hammer", 2, 99, "", 0, 0, 0, 5, 0, 0, 12, 0, 4, 200, 3600,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -25, 0, 45, 5, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 5}},
   {"Battle Hammer", 2, 134, "Knight's Hammer", 0, 0, 0, 7, 0, 0, 0, 0, 4, 250, 4800,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {2, 0, 0, 0, 0, 0, -35, 0, 62, 10, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Thor's Hammer", 2, 232, "Thunder powered hammer", 0, 0, 7, 9, 0, 0, 4, 56, 4, 300, 9200,
    {1, 1, 0, 1, 0, 1, 0, 0},
    {5, 0, 0, 0, 0, 0, -45, 0, 85, 20, 0, 0, 0},
    {0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Rapier", 3, 10, "", 0, 0, 0, 1, 0, 0, 0, 0, 5, 100, 150,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -5, -10, 10, 5, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Short Sword", 3, 10, "", 0, 0, 0, 2, 0, 0, 0, 0, 5, 125, 550,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -10, -15, 24, 10, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Long Sword", 3, 10, "", 0, 0, 0, 4, 0, 0, 0, 0, 5, 150, 1400,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -15, -20, 40, 20, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Katana", 3, 10, "", 0, 0, 0, 6, 0, 0, 0, 0, 5, 175, 3500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 2, 0, 0, 0, 0, -20, -25, 52, 30, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Great Sword", 3, 10, "", 0, 0, 0, 7, 0, 0, 0, 0, 5, 200, 4000,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -25, -30, 65, 25, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Dragon Sword", 3, 34, "", 0, 0, 0, 8, 0, 0, 0, 0, 5, 250, 6000,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -30, -35, 75, 30, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Avenger Blade", 3, 15, "Crusader's Blade", 0, 0, 0, 9, 0, 0, 0, 0, 5, 300, 4500,
    {1, 1, 0, 0, 0, 1, 1, 0},
    {5, 5, 0, 0, 0, 0, -35, -40, 90, 40, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Hand Axe", 4, 130, "", 0, 0, 0, 3, 0, 0, 0, 0, 1, 250, 750,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -10, -25, 36, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Battle Axe", 4, 5, "", 0, 0, 0, 5, 0, 0, 0, 0, 1, 300, 1800,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -20, -40, 50, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Hunter's Axe", 4, 6, "", 0, 0, 0, 8, 0, 0, 0, 0, 1, 350, 3200,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -30, -55, 70, 5, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Slayer's Axe", 4, 3, "Attacks can be fatal", 0, 0, 7, 9, 0, 0, 0, 55, 1, 400, 9000,
    {1, 0, 0, 0, 0, 1, 0, 0},
    {5, 0, 0, 0, 0, 0, -40, -70, 98, 10, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Knife", 5, 5, "", 0, 0, 0, 1, 0, 1, 0, 0, 5, 100, 80,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, -5, 5, 15, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Long Knife", 5, 5, "", 0, 0, 0, 2, 0, 1, 0, 0, 5, 150, 650,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, -10, 21, 25, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Balmar's Dagger", 5, 5, "Thief knife", 0, 0, 0, 5, 0, 1, 0, 0, 5, 200, 3100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 2, 0, 0, 0, -15, 42, 40, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0}},
   {"Aichasi Knife", 5, 3, "Dark blade", 0, 0, 0, 7, 0, 1, 2, 0, 5, 250, 20,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 5, 0, 0, 0, 5, 0, -20, 56, 65, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Half Spear", 6, 132, "", 0, 0, 0, 2, 0, 1, 0, 0, 2, 200, 700,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -5, -5, 27, 5, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Long Spear", 6, 132, "", 0, 0, 0, 5, 1, 1, 0, 0, 2, 250, 2900,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -15, -15, 49, 15, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Battle Spear", 6, 130, "", 0, 0, 0, 8, 1, 1, 0, 0, 2, 300, 4800,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {2, 0, 0, 0, 0, 0, -25, -25, 68, 30, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Chaku Spear", 6, 242, "", 0, 0, 0, 9, 1, 1, 0, 0, 2, 350, 8500,
    {1, 1, 0, 0, 0, 1, 0, 0},
    {0, 0, 5, 0, 0, 0, -35, -35, 94, 45, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Iron Rod", 7, 7, "Fires magic missiles", 4, 0, 6, 2, 0, 0, 0, 0, 4, 50, 640,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Rod of Fire", 7, 18, "Summon fire", 5, 0, 6, 3, 0, 0, 3, 34, 4, 75, 2100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 22, 5, 0, 0, 0},
    {0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Gloom Rod", 7, 1, "Dark power", 5, 0, 6, 4, 0, 0, 2, 38, 4, 125, 5000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 3, 0, 0, 5, -5, 33, 15, 0, 0, 0},
    {0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Crystal Rod", 7, 228, "Call lightning", 5, 0, 6, 6, 0, 0, 4, 46, 4, 150, 6000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 10, 5, 44, 25, 0, 0, 0},
    {0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Temmet Rod", 7, 179, "Wizard's Rod", 5, 0, 6, 7, 0, 0, 0, 0, 4, 200, 8000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 5, 0, 0, 0, 0, 55, 30, 0, 0, 0},
    {2, 3, 2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}},
   {"Staff", 8, 133, "", 3, 0, 6, 1, 1, 0, 0, 0, 4, 50, 120,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Soul Staff", 8, 134, "Staff of Curing", 2, 0, 6, 4, 1, 0, 0, 1, 4, 100, 1200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 2, 0, 0, 10, 22, 5, 0, 0, 0},
    {0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Defender Staff", 8, 82, "Staff of Shielding", 3, 0, 6, 2, 1, 0, 0, 3, 4, 100, 1800,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 2, 0, 0, 0, 0, 0, 38, 10, 5, 5, 5},
    {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Pentha Staff", 8, 50, "Staff of the Wind", 6, 0, 6, 6, 1, 0, 5, 15, 4, 150, 2500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 2, 0, 0, 0, 0, 0, 5, 48, 15, 0, 0, 0},
    {-1, 0, 0, 1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Maham Staff", 8, 211, "Staff of Water", 6, 0, 6, 8, 1, 0, 7, 32, 4, 200, 7000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 2, 0, 0, 0, 10, 10, 62, 20, 0, 0, 0},
    {5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Wooden Shield", 9, 0, "", 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 10, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Iron Shield", 9, 0, "", 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -5, 0, 0, 0, 5, 10, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Steel Shield", 9, 0, "", 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 1200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -10, 0, 0, 0, 12, 15, 4},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Tegal Buckler", 9, 0, "Wizard's shield", 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 1500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 15, 20},
    {5, 5, 5, 5, 5, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0}},
   {"Aegis Shield", 9, 0, "Earthen shield", 0, 1, 0, 5, 0, 0, 0, 0, 0, 0, 3500,
    {1, 1, 1, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -15, 0, 0, 0, 15, 20, 8},
    {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0}},
   {"Opal Shield", 9, 0, "Water elemental", 0, 1, 0, 6, 0, 0, 0, 0, 0, 0, 5500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 25, 10},
    {0, 0, 0, -2, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0}},
   {"Unadium Shield", 9, 0, "Black metal shield", 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 9500,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -20, 0, 0, 0, 25, 35, 16},
    {2, 4, 2, 0, 2, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Cap", 10, 0, "", 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 50,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Wizard Cap", 10, 0, "Headgear for wizards", 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 450,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 2},
    {0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Bandanna", 10, 0, "Thief's headgear", 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 960,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 5, 4},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0}},
   {"Ribbon of Ayol", 10, 0, "Mage's headgear", 0, 2, 0, 4, 0, 0, 0, 0, 0, 0, 4500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 5, 10},
    {0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 10, 5, 5, 10, 10, 5}},
   {"Mask of Tyras", 10, 0, "Headgear of the Ninja", 0, 2, 0, 5, 0, 0, 0, 0, 0, 0, 6000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, -5, 0, 0, 10, 10, 10},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5, 0, 0, 0, 0}},
   {"Leather Helm", 11, 0, "", 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 95,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Iron Helm", 11, 0, "", 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 600,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -5, 0, 0, 0, 6, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Steel Helm", 11, 0, "", 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 2100,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -10, 0, 0, 0, 10, 0, 2},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Opal Helm", 11, 0, "Water elemental", 0, 2, 0, 4, 0, 0, 0, 0, 0, 0, 4200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 5},
    {0, 0, 0, -2, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0}},
   {"Unadium Helm", 11, 0, "Black metal helmet", 0, 2, 0, 5, 0, 0, 0, 0, 0, 0, 6500,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -15, 0, 0, 0, 16, 5, 10},
    {5, 1, 5, 1, 5, 1, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Cloth Robe", 12, 0, "", 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 50,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 4},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Wizard's Robe", 12, 0, "", 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 750,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 10, 8},
    {0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Sorceror Robe", 12, 0, "", 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 2800,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 10, 20},
    {5, 5, 0, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0}},
   {"Arch-Magi Robe", 12, 0, "", 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 6000,
    {0, 0, 1, 1, 1, 0, 0, 1},
    {0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 36, 10, 36},
    {0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Trenta Robes", 12, 0, "Wizard's protection", 0, 3, 0, 5, 0, 0, 0, 0, 0, 0, 9500,
    {0, 0, 1, 1, 1, 0, 0, 1},
    {0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 48, 15, 48},
    {5, 11, 5, 0, 5, 11, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Garment", 13, 0, "", 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 25,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Fighting Suit", 13, 0, "", 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 800,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -5, -10, 0, 0, 10, 10, 5},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0}},
   {"Battle Suit", 13, 0, "", 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 3000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -10, -15, 0, 0, 28, 20, 16},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 8, 0, 0, 0, 0}},
   {"Flanel Shirt", 13, 0, "Strange garment", 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 9900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, -5, 0, 0, 40, 25, 20},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Power Suit", 13, 0, "Ninja garb", 0, 3, 0, 5, 0, 0, 0, 0, 0, 0, 13000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -10, -20, 0, 0, 60, 30, 32},
    {5, 0, 5, 0, 5, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Leather Armor", 14, 0, "", 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 125,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Bronze Armor", 14, 0, "", 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 350,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, -10, 0, 0, 0, 14, 0, 2},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Chain Mail", 14, 0, "", 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 800,
    {1, 1, 1, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -15, 0, 0, 0, 20, 0, 4},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Gold Armor", 14, 0, "", 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 2100,
    {1, 1, 0, 1, 0, 1, 0, 0},
    {0, 0, 0, 0, 0, 0, -20, 0, 0, 0, 30, 0, 8},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Plate Mail", 14, 0, "", 0, 3, 0, 5, 0, 0, 0, 0, 0, 0, 3000,
    {1, 1, 0, 1, 0, 1, 0, 0},
    {0, 0, 0, 0, 0, 0, -25, 0, 0, 0, 38, 0, 10},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Dragon Armor", 14, 0, "Dragon hide", 0, 3, 0, 6, 0, 0, 0, 0, 0, 0, 5100,
    {1, 1, 0, 1, 0, 1, 0, 0},
    {0, 0, 0, 0, 0, 0, -25, 0, 0, 0, 44, 10, 15},
    {0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0}},
   {"Opal Armor", 14, 0, "Water elemental", 0, 3, 0, 7, 0, 0, 0, 0, 0, 0, 6000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 18},
    {0, 0, 5, -4, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0}},
   {"Crystal Armor", 14, 0, "Sturdy rock armor", 0, 3, 0, 8, 0, 0, 0, 0, 0, 0, 8000,
    {1, 1, 0, 1, 0, 1, 0, 0},
    {0, 0, 0, 0, 0, 0, -30, 0, 0, 0, 58, 0, 20},
    {5, 0, 5, 0, 5, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Unadium Armor", 14, 0, "Crusader's Armor", 0, 3, 0, 9, 0, 0, 0, 0, 0, 0, 10000,
    {1, 1, 0, 1, 0, 1, 0, 0},
    {0, 0, 0, 0, 0, 0, -35, 0, 0, 0, 72, 5, 24},
    {2, -5, 2, 2, 2, 10, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Quartz Band", 15, 0, "", 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 250,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2},
    {1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Adamant Band", 15, 0, "", 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4},
    {2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Opal Band", 15, 0, "Water elemental", 0, 4, 0, 3, 0, 0, 0, 0, 0, 0, 1600,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 6},
    {0, 0, 0, 3, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Unadium Band", 15, 0, "Black metal bracer", 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 2700,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8},
    {0, 0, 0, -2, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0}},
   {"Gloves", 16, 0, "", 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 40,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Ninja Gloves", 16, 0, "Increased dexterity", 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 4000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, -5, 0, 0, 9, 5, 4},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Battle Gauntlets", 17, 0, "", 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 400,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -5, 0, 0, 0, 5, 0, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Titan Gaunlets", 17, 0, "Increased strength", 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 1100,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {5, 0, 0, 0, 0, 0, -10, 0, 0, 0, 7, 0, 2},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Force Gauntlets", 17, 0, "Black metal gauntlets", 0, 4, 0, 3, 0, 0, 0, 0, 0, 0, 2200,
    {1, 1, 0, 1, 0, 1, 1, 0},
    {0, 0, 0, 0, 0, 0, -5, 0, 5, 5, 10, 0, 5},
    {0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Boots of Speed", 18, 0, "Agility up", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Hermes Shoes", 18, 0, "Constant Haste", 0, 5, 8, 0, 0, 0, 0, 12, 0, 0, 3500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 10, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Agran Talisman", 19, 0, "Elemental balance", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {5, 0, 0, 0, 0, 0, 0, 5, 5, 0, 5, 5, 0, 0, 0, 0}},
   {"Eagle Eyes", 19, 0, "Perfect vision", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 950,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0}},
   {"Gem of Purity", 19, 0, "Resist Poison", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 800,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 5, 0, 0, 0}},
   {"Mana Locket", 19, 0, "Consume less MP", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 4000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Mesra Feather", 19, 0, "Exotic Feather", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 10}},
   {"Ocean Pearl", 19, 0, "Charm of the Sea", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1600,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 6, 4, 2, 0, 0, 0, 0, 0, 0, 0}},
   {"Power Brace", 19, 0, "Increased strength", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 2000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {10, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Priestess Charm", 19, 0, "Holy pendant", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 2500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 10, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2}},
   {"Regenerator", 19, 0, "Regenerate HP", 0, 5, 8, 0, 0, 0, 0, 21, 0, 0, 6000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Ruby Brooch", 19, 0, "Protection from Fire", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 2000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 5, 10, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Cloak of Shades", 20, 0, "Hide in shadows", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1800,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 2, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0},
    {0, 5, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0}},
   {"Defense Cloak", 20, 0, "Protected by magic", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 3900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 15, 0, 15},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Rune Cloak", 20, 0, "Defend magic", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 3600,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 30},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Spirit Cape", 20, 0, "Partial etherealness", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 2100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 2, 0, 0, 3, 0, 0, 15, 0, 0, 5, 0, 10},
    {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}},
   {"Woodland Cloak", 20, 0, "Larinon mantle", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1700,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 4, 5, 4},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 5, 0}},
   {"Water Ring", 21, 0, "Absorb water attacks", 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 3850,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 10, -5, 0, 0, 0, 15, 5, 0, 0, 0, 0, 0, 0, 0}},
   {"Paladin's Ring", 21, 0, "Crusader's ring", 1, 5, 6, 0, 0, 0, 0, 0, 0, 0, 3200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {5, 0, 5, 0, 0, 0, 0, 15, 10, 0, 12, 0, 12},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Riloc's Ring", 21, 0, "Mage's ring", 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 2900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 5, 5, 0, 20, 0, 0, 0, 0, 0, 10},
    {0, 5, 0, 0, 0, 5, 0, 0, 0, 0, 0, 10, 0, 10, 0, 0}},
   {"Medicinal Herb", 22, 0, "Light Cure", 1, 6, 1, 0, 0, 0, 0, 0, 25, 0, 25,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Neliram Leaf", 22, 0, "Cure Poison", 1, 6, 1, 0, 0, 0, 0, 0, 27, 0, 35,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Olginar Seed", 22, 0, "Restore Some MP", 1, 6, 1, 0, 0, 0, 0, 0, 26, 0, 250,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Selingas Seed", 22, 0, "Strength up", 1, 6, 3, 0, 0, 0, 0, 0, 0, 0, 900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Amasian Seed", 22, 0, "Agility up", 1, 6, 3, 0, 0, 1, 0, 0, 0, 0, 900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Vecindu Seed", 22, 0, "Vitality up", 1, 6, 3, 0, 0, 2, 0, 0, 0, 0, 900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Ingral Seed", 22, 0, "Intellect up", 1, 6, 3, 0, 0, 3, 0, 0, 0, 0, 900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Walsiras Seed", 22, 0, "Wisdom up", 1, 6, 3, 0, 0, 4, 0, 0, 0, 0, 900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Elimas Drops", 23, 0, "Restore More MP", 1, 6, 1, 0, 0, 0, 0, 0, 26, 0, 1200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 150, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Elixir of Daenra", 23, 0, "Restore All Status", 1, 6, 1, 0, 0, 0, 0, 0, 27, 0, 950,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Krendar's Brew", 23, 0, "Remove Silence", 1, 6, 1, 0, 0, 0, 5, 0, 27, 0, 100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Larinon Tonic", 23, 0, "Restore Life", 1, 6, 1, 0, 0, 0, 0, 0, 27, 0, 450,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Nidana Poultice", 23, 0, "Restore Vision", 1, 6, 1, 0, 0, 0, 1, 0, 27, 0, 75,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Potion of Curing", 23, 0, "Maximum Cure", 1, 6, 1, 0, 0, 0, 0, 0, 25, 0, 750,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 480, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Salve", 23, 0, "Medium Cure", 1, 6, 1, 0, 0, 0, 0, 0, 25, 0, 150,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Water of Ensai", 23, 0, "Stone to Flesh", 1, 6, 1, 0, 0, 0, 0, 0, 27, 0, 300,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Elixir of Health", 23, 0, "Max HP up", 1, 6, 3, 0, 0, 0, 0, 0, 0, 0, 1400,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Mystic Elixir", 23, 0, "Max MP up", 1, 6, 3, 0, 0, 0, 0, 0, 0, 0, 1400,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Sun Stone", 24, 0, "Use in sunny places", 3, 6, 3, 0, 0, 0, 0, 0, 0, 0, 750,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Rune of Recovery", 25, 0, "Cure All Allies", 3, 6, 1, 0, 0, 0, 0, 0, 15, 0, 400,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Rune of Air", 25, 0, "Air Element", 6, 6, 5, 0, 0, 0, 4, 0, 32, 0, 500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Rune of Earth", 25, 0, "Earth Element", 6, 6, 5, 0, 0, 0, 0, 0, 33, 0, 500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Rune of Fire", 25, 0, "Fire Element", 6, 6, 5, 0, 0, 0, 2, 0, 34, 0, 500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Rune of Water", 25, 0, "Water Element", 6, 6, 5, 0, 0, 0, 6, 0, 35, 0, 500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"TP100S", 26, 0, "Thin sliver of wood", 4, 6, 5, 0, 0, 0, 0, 0, 32, 0, 400,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Cure1", 27, 0, "Spell Book (Lv1)", 1, 6, 3, 1, 1, 0, 0, 0, 0, 0, 150,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Hold", 27, 0, "Spell Book (Lv1)", 1, 6, 3, 1, 2, 0, 0, 0, 0, 0, 200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Shield", 27, 0, "Spell Book (Lv1)", 1, 6, 3, 1, 3, 0, 0, 0, 0, 0, 200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Silence", 27, 0, "Spell Book (Lv2)", 1, 6, 3, 2, 4, 0, 0, 0, 0, 0, 225,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Sleep", 27, 0, "Spell Book (Lv2)", 1, 6, 3, 2, 5, 0, 0, 0, 0, 0, 250,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Bless", 27, 0, "Spell Book (Lv3)", 1, 6, 3, 3, 6, 0, 0, 0, 0, 0, 300,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Vision", 27, 0, "Spell Book (Lv4)", 1, 6, 3, 4, 7, 0, 0, 0, 0, 0, 450,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Cure2", 27, 0, "Spell Book (Lv5)", 1, 6, 3, 5, 8, 0, 0, 0, 0, 0, 500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Holy Might", 27, 0, "Spell Book (Lv6)", 1, 6, 3, 6, 9, 0, 0, 0, 0, 0, 600,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Restore", 27, 0, "Spell Book (Lv7)", 1, 6, 3, 7, 10, 0, 0, 0, 0, 0, 700,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Fade", 27, 0, "Spell Book (Lv8)", 1, 6, 3, 8, 11, 0, 0, 0, 0, 0, 800,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Hasten", 27, 0, "Spell Book (Lv9)", 1, 6, 3, 9, 12, 0, 0, 0, 0, 0, 900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Life", 27, 0, "Spell Book (Lv10)", 1, 6, 3, 10, 13, 0, 0, 0, 0, 0, 1000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Shell", 27, 0, "Spell Book (Lv11)", 1, 6, 3, 11, 14, 0, 0, 0, 0, 0, 1100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Whirlwind", 27, 0, "Spell Book (Lv12)", 1, 6, 3, 12, 15, 0, 0, 0, 0, 0, 1200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Flood", 27, 0, "Spell Book (Lv13)", 1, 6, 3, 13, 16, 0, 0, 0, 0, 0, 1300,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Recovery", 27, 0, "Spell Book (Lv14)", 1, 6, 3, 14, 17, 0, 0, 0, 0, 0, 1400,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Shield All", 27, 0, "Spell Book (Lv15)", 1, 6, 3, 15, 18, 0, 0, 0, 0, 0, 1500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Sleep All", 27, 0, "Spell Book (Lv16)", 1, 6, 3, 16, 19, 0, 0, 0, 0, 0, 1600,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Cure3", 27, 0, "Spell Book (Lv17)", 1, 6, 3, 17, 20, 0, 0, 0, 0, 0, 1700,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Regenerate", 27, 0, "Spell Book (Lv18)", 1, 6, 3, 18, 21, 0, 0, 0, 0, 0, 1800,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Repulse", 27, 0, "Spell Book (Lv18)", 1, 6, 3, 18, 22, 0, 0, 0, 0, 0, 1800,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Through", 27, 0, "Spell Book (Lv19)", 1, 6, 3, 19, 23, 0, 0, 0, 0, 0, 1900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Quicken", 27, 0, "Spell Book (Lv20)", 1, 6, 3, 20, 24, 0, 0, 0, 0, 0, 2000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"True Aim", 27, 0, "Spell Book (Lv21)", 1, 6, 3, 21, 25, 0, 0, 0, 0, 0, 2100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Wall", 27, 0, "Spell Book (Lv22)", 1, 6, 3, 22, 26, 0, 0, 0, 0, 0, 2200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Divine Guard", 27, 0, "Spell Book (Lv24)", 1, 6, 3, 24, 27, 0, 0, 0, 0, 0, 2400,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Tornado", 27, 0, "Spell Book (Lv25)", 1, 6, 3, 25, 28, 0, 0, 0, 0, 0, 2500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Full Life", 27, 0, "Spell Book (Lv26)", 1, 6, 3, 26, 29, 0, 0, 0, 0, 0, 2600,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Cure4", 27, 0, "Spell Book (Lv27)", 1, 6, 3, 27, 30, 0, 0, 0, 0, 0, 3000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Lumine", 27, 0, "Spell Book (Lv30)", 1, 6, 3, 30, 31, 0, 0, 0, 0, 0, 5500,
    {0, 0, 1, 1, 1, 1, 0, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Tsunami", 27, 0, "Spell Book (Lv35)", 1, 6, 3, 35, 32, 0, 0, 0, 0, 0, 7500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Venom", 28, 0, "Spell Book (Lv1)", 1, 6, 3, 1, 33, 0, 0, 0, 0, 0, 100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Scorch", 28, 0, "Spell Book (Lv1)", 1, 6, 3, 1, 34, 0, 0, 0, 0, 0, 100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Blind", 28, 0, "Spell Book (Lv2)", 1, 6, 3, 2, 35, 0, 0, 0, 0, 0, 200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Confuse", 28, 0, "Spell Book (Lv3)", 1, 6, 3, 3, 36, 0, 0, 0, 0, 0, 300,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Shock", 28, 0, "Spell Book (Lv5)", 1, 6, 3, 5, 37, 0, 0, 0, 0, 0, 500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Gloom", 28, 0, "Spell Book (Lv6)", 1, 6, 3, 6, 38, 0, 0, 0, 0, 0, 600,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Nausea", 28, 0, "Spell Book (Lv7)", 1, 6, 3, 7, 39, 0, 0, 0, 0, 0, 700,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Frost", 28, 0, "Spell Book (Lv8)", 1, 6, 3, 8, 40, 0, 0, 0, 0, 0, 800,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Slow", 28, 0, "Spell Book (Lv9)", 1, 6, 3, 9, 41, 0, 0, 0, 0, 0, 900,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Drain", 28, 0, "Spell Book (Lv10)", 1, 6, 3, 10, 42, 0, 0, 0, 0, 0, 1000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Fire Blast", 28, 0, "Spell Book (Lv11)", 1, 6, 3, 11, 43, 0, 0, 0, 0, 0, 1100,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Warp", 28, 0, "Spell Book (Lv12)", 1, 6, 3, 12, 44, 0, 0, 0, 0, 0, 1200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Stone", 28, 0, "Spell Book (Lv12)", 1, 6, 3, 12, 45, 0, 0, 0, 0, 0, 1200,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Lightning", 28, 0, "Spell Book (Lv13)", 1, 6, 3, 13, 46, 0, 0, 0, 0, 0, 1300,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Virus", 28, 0, "Spell Book (Lv14)", 1, 6, 3, 14, 47, 0, 0, 0, 0, 0, 1400,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Tremor", 28, 0, "Spell Book (Lv15)", 1, 6, 3, 15, 48, 0, 0, 0, 0, 0, 1500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Absorb", 28, 0, "Spell Book (Lv16)", 1, 6, 3, 16, 49, 0, 0, 0, 0, 0, 1600,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Diffuse", 28, 0, "Spell Book (Lv17)", 1, 6, 3, 17, 50, 0, 0, 0, 0, 0, 1700,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Doom", 28, 0, "Spell Book (Lv18)", 1, 6, 3, 18, 51, 0, 0, 0, 0, 0, 1800,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Malison", 28, 0, "Spell Book (Lv20)", 1, 6, 3, 20, 52, 0, 0, 0, 0, 0, 2000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Flame Wall", 28, 0, "Spell Book (Lv24)", 1, 6, 3, 24, 53, 0, 0, 0, 0, 0, 2400,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Blizzard", 28, 0, "Spell Book (Lv25)", 1, 6, 3, 25, 54, 0, 0, 0, 0, 0, 2500,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Death", 28, 0, "Spell Book (Lv28)", 1, 6, 3, 28, 55, 0, 0, 0, 0, 0, 3000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Thunder Storm", 28, 0, "Spell Book (Lv30)", 1, 6, 3, 30, 56, 0, 0, 0, 0, 0, 4500,
    {0, 1, 1, 1, 1, 0, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Negatis", 28, 0, "Spell Book (Lv30)", 1, 6, 3, 30, 57, 0, 0, 0, 0, 0, 5000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Earthquake", 28, 0, "Spell Book (Lv32)", 1, 6, 3, 32, 58, 0, 0, 0, 0, 0, 6400,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Plague", 28, 0, "Spell Book (Lv35)", 1, 6, 3, 35, 59, 0, 0, 0, 0, 0, 7000,
    {0, 1, 1, 1, 1, 0, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"X-Surge", 28, 0, "Spell Book (Lv45)", 1, 6, 3, 45, 60, 0, 0, 0, 0, 0, 15000,
    {0, 0, 1, 1, 1, 0, 0, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Chendigal", 29, 0, "Aura blade", 0, 0, 0, 1, 0, 0, 0, 0, 0, 350, 8500,
    {0, 1, 0, 0, 0, 0, 0, 0},
    {4, 4, 4, -2, -2, 4, 25, -25, 56, 25, 5, 10, 1},
    {0, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Chendigra", 30, 0, "Spirit buckler", 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 8500,
    {0, 1, 0, 0, 0, 0, 0, 0},
    {-2, -2, -2, 4, 4, 1, -25, 25, 50, 25, 10, 20, 4},
    {0, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
   {"Dynamite", 30, 0, "High explosive", 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1000,
    {1, 1, 1, 1, 1, 1, 1, 1},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
};



/* Format: {"Name", Icon, "Description", Stat, Mpc, Use, Tgt, Dmg, Bon, Hit, Elem, Dlvl, Eff,
 *          Clvl {Sensar, Sarina, Corin, Ajathar, Casandra, Temmin, Ayla, Noslom}}
 * "Name" is what the player sees either in the list of spells, or when the spell is being cast
 * Icon is the index for the picture that is on the side of the list of spells (the spell group)
 * "Description" is a very basic description of the type of spell
 * Stat is either 0 or 1
 */
s_spell magic[NUM_SPELLS] = {
   {"", 0, "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    {0, 0, 0, 0, 0, 0, 0, 0}},
   {"Cure1", 45, "Light cure", 1, 4, 2, 2, 30, 100, 0, 16, 1, 15,
    {0, 0, 0, 1, 0, 3, 0, 1}},
   {"Hold", 48, "Paralyze an opponent", 1, 5, 6, 4, 0, 0, 85, 11, 1, 24,
    {0, 0, 0, 1, 0, 0, 0, 0}},
   {"Shield", 47, "Defense boost", 1, 6, 6, 1, 0, 0, 0, 16, 1, 38,
    {0, 0, 0, 0, 0, 5, 0, 0}},
   {"Silence", 48, "Prevent spellcasting", 1, 7, 6, 4, 0, 0, 80, 13, 2, 22,
    {0, 0, 0, 2, 0, 0, 0, 0}},
   {"Sleep", 48, "Put opponent to sleep", 1, 8, 6, 4, 0, 0, 80, 14, 2, 39,
    {0, 0, 0, 4, 0, 0, 0, 0}},
   {"Bless", 47, "Empower allies", 1, 12, 6, 3, 0, 0, 0, 16, 3, 7,
    {0, 0, 0, 0, 0, 7, 0, 0}},
   {"Vision", 40, "See enemy power", 1, 9, 6, 6, 0, 0, 0, 16, 4, 22,
    {0, 0, 0, 0, 0, 0, 0, 0}},
   {"Cure2", 45, "Mild cure", 1, 12, 2, 2, 90, 200, 0, 16, 5, 15,
    {0, 0, 0, 6, 0, 10, 0, 6}},
   {"Holy Might", 47, "Power increase", 1, 10, 6, 1, 0, 0, 0, 16, 6, 23,
    {0, 0, 0, 0, 0, 0, 0, 0}},
   {"Restore", 46, "Heal blind and poison", 1, 6, 2, 1, 0, 0, 0, 16, 7, 31,
    {0, 0, 0, 8, 0, 12, 0, 10}},
   {"Fade", 44, "Positive energy attack", 1, 9, 6, 5, 45, 150, 0, 5, 8, 44,
    {0, 0, 0, 10, 0, 0, 0, 0}},
   {"Hasten", 47, "Speed boost", 1, 12, 6, 1, 0, 0, 0, 15, 9, 30,
    {0, 10, 0, 0, 0, 0, 0, 0}},
   {"Life", 46, "Return to life", 1, 18, 2, 1, 0, 0, 0, 16, 10, 28,
    {0, 0, 0, 12, 0, 15, 0, 12}},
   {"Shell", 47, "Magic defense up", 1, 8, 6, 1, 0, 0, 0, 16, 11, 37,
    {0, 0, 0, 0, 0, 0, 0, 11}},
   {"Whirlwind", 44, "Whirlwind attack", 1, 14, 6, 5, 60, 100, 0, 4, 12, 43,
    {0, 0, 13, 0, 0, 0, 0, 0}},
   {"Flood", 44, "Waves of water", 1, 20, 6, 6, 80, 200, 0, 6, 13, 21,
    {0, 0, 19, 0, 0, 0, 0, 0}},
   {"Recovery", 46, "Recover all status", 1, 20, 2, 1, 0, 0, 0, 16, 14, 31,
    {0, 0, 0, 15, 0, 0, 0, 0}},
   {"Shield All", 47, "Defense boost to all", 1, 25, 6, 3, 0, 0, 0, 16, 15, 38,
    {0, 0, 0, 0, 0, 18, 0, 0}},
   {"Sleep All", 48, "Put all to sleep", 1, 15, 6, 6, 0, 0, 0, 14, 16, 39,
    {0, 0, 0, 16, 0, 0, 0, 0}},
   {"Cure3", 45, "Strong cure", 1, 24, 2, 2, 360, 400, 0, 16, 17, 15,
    {0, 0, 0, 17, 0, 0, 0, 18}},
   {"Regenerate", 47, "Regenerate hp", 1, 11, 6, 1, 0, 0, 0, 16, 18, 15,
    {0, 0, 0, 0, 0, 0, 0, 0}},
   {"Repulse", 40, "Repel monsters", 1, 15, 4, 3, 0, 0, 0, 16, 18, 23,
    {0, 0, 0, 19, 0, 0, 0, 0}},
   {"Through", 47, "Etherealness", 1, 24, 6, 1, 0, 0, 0, 16, 19, 19,
    {0, 0, 0, 0, 0, 21, 0, 0}},
   {"Quicken", 47, "Speed boost for all", 1, 22, 6, 3, 0, 0, 0, 15, 20, 30,
    {0, 21, 0, 0, 0, 0, 0, 0}},
   {"True Aim", 47, "Can't miss", 1, 16, 6, 1, 0, 0, 0, 16, 21, 22,
    {0, 0, 0, 21, 0, 0, 0, 0}},
   {"Wall", 47, "Improved magic defense", 1, 30, 6, 1, 0, 0, 0, 16, 22, 37,
    {0, 0, 0, 0, 0, 0, 0, 22}},
   {"Divine Guard", 47, "Shield and Shell", 1, 28, 6, 3, 0, 0, 0, 5, 24, 44,
    {0, 0, 0, 24, 0, 0, 0, 0}},
   {"Tornado", 44, "Twister", 1, 32, 6, 5, 100, 150, 0, 4, 25, 43,
    {0, 0, 26, 0, 0, 0, 0, 0}},
   {"Full Life", 46, "Return to full life", 1, 48, 2, 1, 0, 0, 0, 16, 26, 28,
    {0, 0, 0, 26, 0, 0, 0, 0}},
   {"Cure4", 45, "Full cure", 1, 40, 2, 2, 999, 800, 0, 16, 27, 15,
    {0, 0, 0, 28, 0, 0, 0, 0}},
   {"Lumine", 44, "Holy blast", 1, 50, 6, 5, 125, 250, 0, 5, 30, 44,
    {0, 0, 0, 32, 0, 0, 0, 30}},
   {"Tsunami", 44, "Tidal waves", 1, 40, 6, 6, 115, 200, 0, 6, 35, 21,
    {0, 0, 36, 0, 0, 0, 0, 0}},
   {"Venom", 49, "Poison attack", 0, 4, 6, 4, 15, 100, 75, 8, 1, 42,
    {0, 0, 0, 0, 1, 0, 4, 2}},
   {"Scorch", 49, "Weak fire attack", 0, 5, 6, 5, 25, 100, 0, 2, 1, 36,
    {0, 4, 3, 0, 1, 0, 0, 4}},
   {"Blind", 43, "Blind one opponent", 0, 6, 6, 4, 0, 0, 80, 9, 2, 8,
    {0, 0, 0, 0, 0, 0, 7, 0}},
   {"Confuse", 43, "Confuse one opponent", 0, 10, 6, 4, 0, 0, 85, 10, 3, 14,
    {0, 0, 0, 0, 0, 0, 10, 0}},
   {"Shock", 49, "Shocking strike", 0, 8, 6, 5, 35, 100, 0, 3, 5, 11,
    {0, 8, 7, 0, 5, 0, 0, 7}},
   {"Gloom", 49, "Negative energy attack", 0, 10, 6, 5, 45, 150, 0, 1, 6, 6,
    {0, 0, 0, 0, 7, 0, 0, 8}},
   {"Nausea", 43, "Sicken opponents", 0, 9, 6, 4, 0, 0, 85, 16, 7, 22,
    {0, 0, 0, 0, 0, 0, 12, 0}},
   {"Frost", 49, "Snow and ice attack", 0, 10, 6, 5, 50, 150, 0, 7, 8, 9,
    {0, 0, 10, 0, 8, 0, 0, 0}},
   {"Slow", 43, "Slow enemy reactions", 0, 15, 6, 6, 0, 0, 85, 15, 9, 40,
    {0, 0, 0, 0, 0, 0, 15, 0}},
   {"Drain", 43, "Steal hit points", 0, 13, 6, 4, 25, 75, 75, 16, 10, 18,
    {0, 0, 0, 0, 10, 0, 0, 0}},
   {"Fire Blast", 49, "Mild fire attack", 0, 12, 6, 5, 60, 150, 0, 2, 11, 20,
    {0, 14, 16, 0, 11, 0, 0, 13}},
   {"Warp", 41, "Warp out of danger", 0, 10, 2, 3, 0, 0, 0, 16, 12, 51,
    {0, 0, 0, 0, 0, 0, 0, 0}},
   {"Stone", 43, "Petrify one enemy", 0, 12, 6, 4, 0, 0, 60, 12, 12, 41,
    {0, 0, 0, 0, 12, 0, 0, 14}},
   {"Lightning", 49, "Lightning attack", 0, 18, 6, 5, 75, 200, 0, 3, 13, 12,
    {0, 16, 22, 0, 13, 0, 0, 16}},
   {"Virus", 49, "Viral infection", 0, 16, 6, 5, 65, 150, 75, 8, 14, 42,
    {0, 0, 0, 0, 0, 0, 18, 0}},
   {"Tremor", 49, "Shake it up", 0, 20, 6, 6, 70, 150, 0, 0, 15, 29,
    {0, 0, 20, 0, 15, 0, 0, 0}},
   {"Absorb", 43, "Steal magic points", 0, 1, 6, 4, 20, 50, 75, 16, 16, 3,
    {0, 0, 0, 0, 16, 0, 0, 0}},
   {"Diffuse", 43, "Remove defenses", 0, 16, 6, 4, 0, 0, 0, 16, 17, 16,
    {0, 0, 0, 0, 0, 0, 0, 17}},
   {"Doom", 43, "Drain life", 0, 18, 6, 4, 0, 0, 75, 1, 18, 17,
    {0, 0, 0, 0, 0, 0, 0, 20}},
   {"Malison", 43, "Dehabilitate opponents", 0, 24, 6, 6, 0, 0, 80, 16, 20, 22,
    {0, 0, 0, 0, 0, 0, 24, 0}},
   {"Flame Wall", 49, "Strong fire attack", 0, 27, 6, 5, 90, 200, 0, 2, 24, 20,
    {0, 27, 30, 0, 24, 0, 0, 0}},
   {"Blizzard", 49, "Snow and ice attack", 0, 30, 6, 6, 95, 200, 0, 7, 25, 10,
    {0, 0, 35, 0, 25, 0, 0, 0}},
   {"Death", 43, "Eliminate life", 0, 20, 6, 4, 0, 0, 50, 1, 28, 17,
    {0, 0, 0, 0, 0, 0, 0, 28}},
   {"Thunder Storm", 49, "Thunderstorm", 0, 45, 6, 5, 120, 200, 0, 3, 30, 13,
    {0, 33, 40, 0, 30, 0, 0, 0}},
   {"Negatis", 49, "The Void", 0, 50, 6, 5, 125, 250, 0, 1, 30, 6,
    {0, 0, 0, 0, 36, 0, 0, 32}},
   {"Earthquake", 49, "Earthquake attack", 0, 36, 6, 6, 110, 200, 0, 0, 32, 29,
    {0, 0, 42, 0, 32, 0, 0, 0}},
   {"Plague", 49, "Disease attack", 0, 60, 6, 5, 140, 300, 75, 8, 35, 42,
    {0, 0, 0, 0, 35, 0, 36, 0}},
   {"X-Surge", 49, "Non-elemental attack", 0, 75, 6, 5, 200, 500, 0, 16, 45, 45,
    {0, 0, 0, 0, 45, 0, 0, 0}},
};



s_effect eff[NUM_EFFECTS] = {
   {0,    0,  0, 0,   0,   0,  0, "_"},
   {3,   24, 24, 1,  50,   0, 10, "AAXE_PCX"},
   {3,   24, 24, 1,  50,   0, 12, "AAXE_PCX"},
   {17,  24, 24, 1, 100,  19, 40, "ABSORB_PCX"},
   {3,   24, 24, 1,  50,   0, 13, "AMACE_PCX"},
   {3,   24, 24, 1,  50,   0, 11, "ASWORD_PCX"},
   {9,   32, 32, 1, 120,   4, 17, "BLACK_PCX"},
   {8,   32, 32, 1, 120, 102,  7, "BLESS_PCX"},
   {10,  32, 32, 1, 120,   6, 35, "BLIND_PCX"},
   {18,  40, 40, 1,  75, 122, 15, "BLIZ1_PCX"},
   {15,  48, 48, 1, 100, 122, 14, "BLIZ2_PCX"},
   {6,   40, 80, 0, 150, 106, 19, "BOLT1_PCX"},
   {9,   40, 80, 0, 120, 106, 32, "BOLT2_PCX"},
   {15,  40, 80, 0, 100, 106, 33, "BOLT3_PCX"},
   {8,   32, 32, 1, 120, 200, 37, "CONFUSE_PCX"},
   {18,  40, 40, 1, 100, 248, 29, "CURE_PCX"},
   {14,  32, 32, 1, 120, 103, 38, "DIFFUSE_PCX"},
   {20,  32, 32, 1, 100,   4, 39, "DOOM_PCX"},
   {17,  24, 24, 1, 100,  38, 40, "DRAIN_PCX"},
   {21,  24, 24, 1,  70, 246,  7, "ETHEREAL_PCX"},
   {12,  60, 60, 0, 100,  23,  8, "FLAME_PCX"},
   {7,  160, 64, 1, 180,  58, 20, "FLOOD_PCX"},
   {11,  32, 32, 1, 120,  12,  7, "GENERIC_PCX"},
   {11,  32, 32, 1, 150, 248,  3, "HEROISM_PCX"},
   {16,  24, 24, 1, 100, 137,  7, "HOLD_PCX"},
   {10,  32, 32, 0, 100, 248,  3, "ICUREHP_PCX"},
   {14,  32, 32, 1, 120,  19,  3, "ICUREMP_PCX"},
   {16,  40, 40, 1, 150, 248,  3, "IRESTORE_PCX"},
   {20,  32, 32, 1, 150,  12, 30, "LIFE_PCX"},
   {17, 160, 32, 0, 120, 138, 16, "QUAKE_PCX"},
   {20,  32, 42, 0,  75,  12,  7, "QUICKEN_PCX"},
   {16,  40, 40, 1, 150, 248, 30, "RESTORE_PCX"},
   {11,  40, 40, 1, 120,  10, 15, "RUNEOFA_PCX"},
   {11,  40, 40, 1, 120, 138, 16, "RUNEOFE_PCX"},
   {11,  40, 40, 1, 120,  26,  8, "RUNEOFF_PCX"},
   {11,  40, 40, 1, 120, 186, 14, "RUNEOFI_PCX"},
   {10,  32, 32, 1, 120,  87,  8, "SCORCH_PCX"},
   {12,  40, 40, 1, 100,  40, 23, "SHELL_PCX"},
   {12,  40, 40, 1, 100, 106, 23, "SHIELD_PCX"},
   {9,   32, 32, 1, 150,  51,  7, "SLEEP_PCX"},
   {20,  32, 42, 0, 100,   4,  7, "SLOW_PCX"},
   {5,   32, 32, 1, 150,   9,  3, "STONE_PCX"},
   {9,   40, 40, 1, 100,  35,  9, "VENOM1_PCX"},
   {8,   40, 40, 1, 120,  10, 15, "WHIRL_PCX"},
   {7,   32, 32, 1, 150,  12, 18, "WHITE_PCX"},
   {17,  32, 32, 1, 120,  12,  7, "XSURGE_PCX"},
   {7,   32, 32, 1, 140,   9, 41, "STONEGAS_PCX"},
   {7,   32, 32, 1, 140, 168, 41, "POISGAS_PCX"},
   {13,  32, 32, 1, 140,   6, 17, "RASP_PCX"},
   {11,  32, 32, 1, 150,   8, 17, "SBLAST_PCX"},
   {3,   24, 24, 1,  50,   0, 31, "AAXE_PCX"},
   {11,  32, 32, 1, 120,   6,  7, "GENERIC_PCX"},
};



/* Format: {tnum, lvl, per, idx[5]}
 * tnum:    Encounter number in the Encounter table
 * lvl:     Level of monsters
 * per:     When random encounters are specified, this is the cumulative percentage that this one will be selected
 * idx[5]:  There can be up to 5 enemies per battle; index of each enemy (index starts at 1; 0 means NO enemy)
 */
s_erow erows[NUM_ETROWS] = {
   {0,   2,  20, {3,   3,  3,  0, 0}},
   {0,   1,  40, {3,   3,  0,  0, 0}},
   {0,   1,  60, {4,   4,  0,  0, 0}},
   {0,   1,  80, {3,   0,  0,  0, 0}},
   {0,   1, 100, {4,   4,  0,  0, 0}},
   {1,   2,  20, {3,   3,  3,  0, 0}},
   {1,   1,  40, {3,   3,  0,  0, 0}},
   {1,   3,  60, {5,   0,  0,  0, 0}},
   {1,   3,  80, {5,   5,  0,  0, 0}},
   {1,   3, 100, {6,   0,  0,  0, 0}},
   {1,   0,   0, {11,  0,  0,  0, 0}},
   {2,   4,  25, {35, 35,  0,  0, 0}},
   {2,   5,  40, {36, 36,  0,  0, 0}},
   {2,   5,  50, {35, 36,  7,  0, 0}},
   {2,   5,  75, {1,   1,  1,  1, 0}},
   {2,   4, 100, {5,   5,  5,  0, 0}},
   {2,   0,   0, {9,  9,  0,  0, 0}},
   {3,   8,  25, {9,  9,  0,  0, 0}},
   {3,   8,  50, {1, 1,  1,  0, 0}},
   {3,   8,  75, {5, 5,  0,  0, 0}},
   {3,   8, 100, {5, 5,  5,  0, 0}},
   {4,  12,  50, {19, 19, 18,  0, 0}},
   {4,  11,  80, {18,  0,  0,  0, 0}},
   {4,  11,  90, {18, 18,  0,  0, 0}},
   {4,  11, 100, {22, 22,  0,  0, 0}},
   {5,  11,  33, {22,  0,  0,  0, 0}},
   {5,  11,  66, {22, 22,  0,  0, 0}},
   {5,  11, 100, {22, 22, 22,  0, 0}},
   {6,  12,  15, {19, 19, 18,  0, 0}},
   {6,  12,  30, {18, 18,  0,  0, 0}},
   {6,  12,  45, {18, 18, 18,  0, 0}},
   {6,  12,  60, {19, 19, 21,  0, 0}},
   {6,  12,  75, {21, 21, 18,  0, 0}},
   {6,  12,  90, {22, 22,  0,  0, 0}},
   {6,  12, 100, {22, 22, 22,  0, 0}},
   {7,  10,  25, {6, 6, 6,  6, 0}},
   {7,  10,  50, {15, 15, 0,  0, 0}},
   {7,  10,  75, {15, 15,  0,  0, 0}},
   {7,  10, 100, {6, 6,  6,  0, 0}},
   {7,   0,   0, {15, 15, 13,  15, 15}},
   {8,  15,  25, {22, 22, 22,  0, 0}},
   {8,  15,  50, {21, 21, 22,  0, 0}},
   {8,  15,  75, {21, 21, 21,  0, 0}},
   {8,  15, 100, {24, 24, 22,  0, 0}},
   {8,   0,   0, {34,  0,  0,  0, 0}},
   {9,   1,  15, {3,   0,  0,  0, 0}},
   {9,   1,  30, {3,   3,  0,  0, 0}},
   {9,   1,  45, {1,   1,  0,  0, 0}},
   {9,   1,  60, {1,   1,  1,  0, 0}},
   {9,   1,  75, {2,   2,  0,  0, 0}},
   {9,   1, 100, {2,   2,  2,  0, 0}},
   {10,  0,  20, {5,  0,  0,  0, 0}},
   {10,  0,  40, {5,  0,  0,  0, 0}},
   {10,  0,  60, {5,  5,  0,  0, 0}},
   {10,  0,  95, {5,  5,  0,  0, 0}},
   {10,  0,  100, {5, 5,  5, 0, 0}},
   {11, 19,  10, {27,  0,  1,  0, 0}},
   {11, 19,  30, {27,  1,  0,  0, 0}},
   {11, 19,  40, {27,  1,  1,  0, 0}},
   {11, 19,  60, {31,  1,  0,  0, 0}},
   {11, 19,  80, {32,  1,  0,  0, 0}},
   {11, 19, 100, {29,  1,  0,  0, 0}},
   {12, 19,  35, {28, 28,  0,  0, 0}},
   {12, 19,  60, {25, 25, 25,  0, 0}},
   {12, 19,  80, {29, 29, 25,  0, 0}},
   {12, 19, 100, {29, 29,  0,  0, 0}},
   {13, 19,  20, {23, 23,  0,  0, 0}},
   {13, 19,  50, {25, 25, 25,  0, 0}},
   {13, 20,  75, {29, 29, 25,  0, 0}},
   {13, 19, 100, {29, 29,  0,  0, 0}},
   {14, 21,  10, {33,  0,  0,  0, 0}},
   {14, 20,  40, {25, 25, 25,  0, 0}},
   {14, 19,  70, {29, 29, 25,  0, 0}},
   {14, 19, 100, {29, 29,  0,  0, 0}},
   {15, 16, 100, {30,  0,  0,  0, 0}},
   {15,  0,   0, {30, 26, 26, 26, 0}},
   {15,  0,   0, {30,  0,  0,  0, 0}},
   {16, 11,  25, {35, 35, 35,  0, 0}},
   {16, 11,  50, {36, 36,  0,  0, 0}},
   {16, 12,  75, {37, 37,  0,  0, 0}},
   {16, 12, 100, {38,  0,  0,  0, 0}},
   {16,  0,   0, {39,  0,  0,  0, 0}},
   {17,  0,   0, {40,  0,  0,  0, 0}},
   {17,  0,   0, {41,  0,  0,  0, 0}},
   {17,  0,   0, {42,  0,  0,  0, 0}},
   {17,  0,   0, {43,  0,  0,  0, 0}},
   {17,  0,   0, {44,  0,  0,  0, 0}},
   {17,  0,   0, {45,  0,  0,  0, 0}},
   {17,  0,   0, {46,  0,  0,  0, 0}},
   {18, 25,  33, {47, 47,  0,  0, 0}},
   {18, 25,  66, {48, 48, 48,  0, 0}},
   {18, 25, 100, {49, 49,  0,  0, 0}},
   {19, 25,  25, {47, 47,  0,  0, 0}},
   {19, 25,  50, {49, 49,  0,  0, 0}},
   {19, 25,  75, {50, 50,  0,  0, 0}},
   {19, 25, 100, {47, 47, 50,  0, 0}},
   {20, 25,  50, {50, 50,  0,  0, 0}},
   {20, 20, 100, {23, 23, 23,  0, 0}},
   {20,  0,   0, {55,  0,  0,  0, 0}},
   {21, 26,  25, {51, 52,  0,  0, 0}},
   {21, 27,  50, {51, 51,  0,  0, 0}},
   {21, 27,  75, {52,  0,  0,  0, 0}},
   {21, 27, 100, {53, 53,  0,  0, 0}},
   {21,  0,   0, {52,  0,  0,  0, 0}},
   {21,  0,   0, {52, 52, 52,  0, 0}},
   {21,  0,   0, {54,  0,  0,  0, 0}},
   {22, 15,  33, {59, 59, 60,  0, 0}},
   {22, 15,  66, {60, 59,  0,  0, 0}},
   {22, 15, 100, {60, 60, 59,  0, 0}},
   {23, 20, 100, {57,  0,  0,  0, 0}},
   {23, 15, 100, {58, 58, 58, 58, 0}},
};


/*! WK - There is no reason that the map name needs to be stored in an
 * encounter struct. Zone is also unnecessary. */
#define MAP_BRIDGE 0
#define MAP_CAMP 0
#define MAP_CAVE1 0
#define MAP_CAVE3A 0
#define MAP_CAVE3B 0
#define MAP_CAVE4 0
#define MAP_COLISEUM 0
#define MAP_CULT 0
#define MAP_ESTATE 0
#define MAP_GROTTO2 0
#define MAP_GUILD 0
#define MAP_PASS 0
#define MAP_SHRINE 0
#define MAP_TEMPLE1 0
#define MAP_TEMPLE2 0
#define MAP_TUNNEL 0
#define MAP_TUNNEL2 0
#define MAP_TOWER 0
#define MAP_CAVE5 0
#define MAP_MAIN 0




/* Format: {Map, Zone, Enc, Etnum, Eidx, "BMusic", "BackImg"}
 *   Map:       Where this battle occurs
 *   Zone:      What triggers this battle
 *   Enc:       The 1-in-enc chance there will NOT be combat
 *   Etnum:     Select rows in the Encounter table
 *   Eidx:      Select row out of the etnum; 99 for random
 *   "BMusic":  Music file to play
 *   "BackImg": Background image
 */
s_encounter battles[NUM_BATTLES] = {
   {MAP_BRIDGE,   255,  1,  2,  5, "walk.s3m", "BACK7_PCX"},  //0
   {MAP_CAVE1,    13,  25, 10, 99, "hm.s3m",   "BACK2_PCX"},  //1
   {MAP_CAMP,     255,  1, 10,  1, "hm.s3m",   "BACK7_PCX"},  //2
   {MAP_TUNNEL,     255,  25, 10,  99, "hm.s3m",   "BACK2_PCX"},  //3
   {MAP_CAMP,     255,  1, 10,  3, "hm.s3m",   "BACK7_PCX"},  //4
   {MAP_CAMP,     255,  1, 10,  4, "hm.s3m",   "BACK7_PCX"},  //5
   {MAP_CAVE1,      7, 25,  1, 99, "hm.s3m",   "BACK2_PCX"},  //6
   {MAP_CAVE1,    255,  1,  1,  5, "walk.s3m", "BACK2_PCX"}, //7
   {MAP_CAVE3A,  255, 25,  9, 99, "hm.s3m",   "BACK2_PCX"}, //8
   {MAP_TUNNEL2,  255, 25,  2, 99, "hm.s3m",   "BACK2_PCX"}, //9
   {MAP_CAVE4,      0, 25, 16, 99, "hm.s3m",   "BACK8_PCX"}, //10
   {MAP_CAVE4,    255,  1, 16,  4, "walk.s3m", "BACK8_PCX"}, //11
   {MAP_COLISEUM, 255,  1, 17,  0, "hm.s3m",   "BACK9_PCX"}, //12
   {MAP_COLISEUM, 255,  1, 17,  1, "hm.s3m",   "BACK9_PCX"}, //13
   {MAP_COLISEUM, 255,  1, 17,  2, "hm.s3m",   "BACK9_PCX"}, //14
   {MAP_COLISEUM, 255,  1, 17,  3, "hm.s3m",   "BACK9_PCX"}, //15
   {MAP_COLISEUM, 255,  1, 17,  4, "hm.s3m",   "BACK9_PCX"}, //16
   {MAP_COLISEUM, 255,  1, 17,  5, "hm.s3m",   "BACK9_PCX"}, //17
   {MAP_COLISEUM, 255,  1, 17,  6, "hm.s3m",   "BACK9_PCX"}, //18
   {MAP_CULT,       0, 25, 21, 99, "hm.s3m",   "BACK11_PCX"}, //19
   {MAP_CULT,     255,  1, 21,  5, "hm.s3m",   "BACK11_PCX"}, //20
   {MAP_CULT,     255,  1, 21,  6, "walk.s3m", "BACK11_PCX"}, //21
   {MAP_CULT,     255,  1, 21,  4, "hm.s3m",   "BACK11_PCX"}, //22
   {MAP_ESTATE,   255,  1, 15,  2, "walk.s3m", "BACK6_PCX"}, //23
   {MAP_GROTTO2,   255, 25,  9, 99, "hm.s3m",   "BACK7_PCX"}, //24
   {MAP_GUILD,      0, 25, 15, 99, "hm.s3m",   "BACK6_PCX"}, //25
   {MAP_GUILD,    255,  1, 15,  1, "walk.s3m", "BACK6_PCX"}, //26
   {MAP_MAIN,     255, 25,  0, 99, "hm.s3m",   "BACK7_PCX"}, //27
   {MAP_MAIN,     255, 25,  0, 99, "hm.s3m",   "BACK1_PCX"}, //28
   {MAP_MAIN,     255, 25,  3, 99, "hm.s3m",   "BACK7_PCX"}, //29
   {MAP_MAIN,     255, 25,  2, 99, "hm.s3m",   "BACK1_PCX"}, //30
   {MAP_MAIN,     255, 25,  3, 99, "hm.s3m",   "BACK7_PCX"}, //31
   {MAP_MAIN,     255, 25,  3, 99, "hm.s3m",   "BACK1_PCX"}, //32
   {MAP_MAIN,     255, 25,  4, 99, "hm.s3m",   "BACK7_PCX"}, //33
   {MAP_MAIN,     255, 25,  4, 99, "hm.s3m",   "BACK1_PCX"}, //34
   {MAP_MAIN,     255, 25,  5, 99, "hm.s3m",   "BACK7_PCX"}, //35
   {MAP_MAIN,     255, 25,  5, 99, "hm.s3m",   "BACK1_PCX"}, //36
   {MAP_MAIN,     255, 25, 12, 99, "hm.s3m",   "BACK7_PCX"}, //37
   {MAP_MAIN,     255, 25, 12, 99, "hm.s3m",   "BACK1_PCX"}, //38
   {MAP_MAIN,     255, 25, 13, 99, "hm.s3m",   "BACK7_PCX"}, //39
   {MAP_MAIN,     255, 25, 13, 99, "hm.s3m",   "BACK1_PCX"}, //40
   {MAP_MAIN,     255, 25, 14, 99, "hm.s3m",   "BACK7_PCX"}, //41
   {MAP_MAIN,     255, 25, 14, 99, "hm.s3m",   "BACK1_PCX"}, //42
   {MAP_MAIN,     255, 25, 11, 99, "hm.s3m",   "BACK1_PCX"}, //43
   {MAP_MAIN,     255, 25, 11, 99, "hm.s3m",   "BACK1_PCX"}, //44
   {MAP_MAIN,     255, 25, 20, 99, "hm.s3m",   "BACK7_PCX"}, //45
   {MAP_MAIN,     255, 25, 20, 99, "hm.s3m",   "BACK1_PCX"}, //46
   {MAP_MAIN,     255, 25, 19, 99, "hm.s3m",   "BACK7_PCX"}, //47
   {MAP_MAIN,     255, 25, 19, 99, "hm.s3m",   "BACK1_PCX"}, //48
   {MAP_MAIN,     255,  1, 20,  2, "hm.s3m",   "BACK1_PCX"}, //49
   {MAP_PASS,       0, 25, 18, 99, "hm.s3m",   "BACK10_PCX"}, //50
   {MAP_SHRINE,     255, 40,  7, 99, "hm.s3m",   "BACK4_PCX"}, //51
   {MAP_SHRINE,     0,  1,  7,  4, "walk.s3m",   "BACK4_PCX"}, //52
   {MAP_TEMPLE2,  255,  1,  7,  4, "walk.s3m", "BACK2_PCX"}, //53
   {MAP_TOWER,      0, 25,  8, 99, "hm.s3m",   "BACK5_PCX"}, //54
   {MAP_TOWER,    255,  1,  8,  4, "walk.s3m", "BACK5_PCX"}, //55
   {MAP_MAIN,     255,  1, 22,  0, "hm.s3m",   "BACK2_PCX"}, //56
   {MAP_CAVE5,      0, 25, 22, 99, "hm.s3m",   "BACK2_PCX"}, //57
   {MAP_CAVE5,    255,  1, 23,  0, "walk.s3m", "BACK2_PCX"}, //58
   {MAP_CAVE5,    255,  1, 23,  1, "hm.s3m",   "BACK2_PCX"}, //59
};

// *INDENT-ON*
